<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>User分页显示</title>
	</head>
	<body>
		<div>
			<table>
				<tr>
					<th>
						登陆ID
					</th>
					<th>
						用户姓名
					</th>
					<th>
						电子邮箱
					</th>
					<th>
						角色
					</th>
				</tr>
				<s:iterator value="page.items">
					<tr>
						<td>
							<s:property value="loginid" />
						</td>
						<td>
							<s:property value="name" />
						</td>
						<td>
							<s:property value="email" />
						</td>
						<td>
							<s:property value="roles[1].name" />
						</td>
					</tr>
				</s:iterator>
			</table>
			
			<s:url id="url_first" value="user!list.action">
				<s:param name="page.pageNum" value="0"></s:param>
			</s:url>
			
			<s:url id="url_pre" value="user!list.action">
				<s:param name="page.pageNum" value="page.pageNum-1"></s:param>
			</s:url>

			<s:url id="url_next" value="user!list.action">
				<s:param name="page.pageNum" value="page.pageNum+1"></s:param>
			</s:url>
			
			<s:url id="url_last" value="user!list.action">
				<s:param name="page.pageNum" value="page.pageNum+1"></s:param>
			</s:url>

			<s:a href="%{url_first}">首页</s:a>

			<s:a href="%{url_pre}">上一页</s:a>

			<s:a href="%{url_next}">下一页</s:a>
			
			<s:a href="%{url_last}">末页</s:a>
		</div>
	</body>
</html>
